#ifndef APP_USB232_H
#define APP_USB232_H
#include "stdint.h"

enum
{
    LOG_ERROR = 1,
    LOG_WARN,
    LOG_DEBUG,
};

#define LOG_LEVEL 3

struct app_usb_struct_def
{
    uint8_t connect_flag;
    uint32_t download_addr;
    void (*init)(void);
    void (*control)(uint8_t flag); // 0 reset 1 config 2 work
    void (*isr)(void);
    void (*task)(void);
    int32_t (*log)(int8_t level, int8_t *fmt, ...);
};

extern struct app_usb_struct_def app_usb_struct;

#endif